package com.jrx.anytxn.transaction.job.marketingFile.step;

import com.jrx.anytxn.param.entity.PrOrganizationTable;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.batch.MyBatisPagingItemReader;

import java.util.HashMap;
import java.util.Map;

public class MarketingSumFileReader extends MyBatisPagingItemReader<String> {

    public MarketingSumFileReader(SqlSessionFactory sqlSessionFactory, PrOrganizationTable org, Integer pagesize){
        setSaveState(false);
        setPageSize(pagesize);
        setSqlSessionFactory(sqlSessionFactory);
        setQueryId("com.jrx.anytxn.customer.mapper.ext.ExtTlMarketingRecordMapper.selectRecomderByBatch");
        Map<String, Object> map = new HashMap<>();
        map.put("businessDate",org.getToday());
        setParameterValues(map);
    }

}
